﻿using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Microsoft.AspNetCore.Mvc//这里使用这个命名空间仅仅是为了派生的Controller能够自动引入Microsoft.AspNetCore.Mvc命名空间^_^
{
    public class AppConfig:IOptions<AppConfig>
    {
        /// <summary>
        /// 服务端名称
        /// </summary>
        public string AppName { get; set; }
        /// <summary>
        /// 服务端版本
        /// </summary>
        public string AppVersion { get; set; }
        /// <summary>
        /// 连接字符串
        /// </summary>
        public string ConnectionString { get; set; }
        /// <summary>
        /// 数据库类型
        /// </summary>
        public string dbType { get; set; }
        /// <summary>
        /// 验证码类型，1纯数字，2纯英文小写，4纯英文大写，8纯汉字
        /// </summary>
        public int AuthCodeType { get; set; } = 1;
        /// <summary>
        /// 验证码长度
        /// </summary>
        public int AuthCodeCount { get; set; } = 4;

        public AppConfig Value => this;
    }
}
